from sqlalchemy import create_engine
from sqlalchemy.orm import Session

import settings
from db import utils as db_utils
from db import models


record_connect_to_db = '{}+{}://{}:{}@{}/{}'.format(
     settings.DIALECT_DB,
     settings.DRIVER_DB,
     settings.USERNAME_DB,
     settings.USER_PASSWORD_DB,
     settings.HOST_DB,
     settings.NAME_DB
)
engine = create_engine(record_connect_to_db)
session = Session(bind=engine)

models.Base.metadata.create_all(engine)
